<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function(t) {
    var ctx = document.createElement('canvas').getContext('2d');
    
    var radgrad = ctx.createRadialGradient(80, 90, 90, 80, 50, 100);
    radgrad.addColorStop(0, 'green');
    radgrad.addColorStop(1, 'green');
    
    ctx.fillStyle = radgrad;
    ctx.fillRect(0, 0, 100, 100);
    var imageData = ctx.getImageData(0, 0, 100, 100).data;
    assert_array_equals(imageData.slice(4, 8), [0, 128, 0, 255]);
}, "Verify correct behaviour of spreadMethod to a radial gradient.");
</script>
